package com.laogao.service;

import com.laogao.common.page.PageResult;
import com.laogao.entity.TDocument;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
 * @author gao liang
 * @date 2023-04-21 20:12
 */
public interface AdxDocumentService {
    /**
     * 查
     *
     * @param id
     * @return
     */
    TDocument query(Long id);

    /**
     * 删
     *
     * @param id
     * @return
     */
    void delete(Long id) throws Exception;

    /**
     * 分页分类展示
     *
     * @param currentPage
     * @param pageSize
     * @param type
     * @param fileName
     * @return
     * @throws Exception
     */
    PageResult<TDocument> getPage(Integer currentPage, Integer pageSize, Integer type, String fileName) throws Exception;

    /**
     * 更新
     *
     * @param id
     * @param file
     * @param request
     * @throws Exception
     */
    void update(Long id, MultipartFile file, HttpServletRequest request) throws Exception;

    /**
     * 添加
     *
     * @param file
     * @param request
     * @throws Exception
     */
    void add(MultipartFile file, HttpServletRequest request) throws Exception;
}
